package com.example.teamtribe.main.club.manage.finace;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.widget.TextView;

import com.example.teamtribe.R;
import com.example.teamtribe.base.BaseActivity;
import com.example.teamtribe.database.Bill;
import com.example.teamtribe.database.Team;

import org.litepal.crud.DataSupport;

import java.util.List;

public class FinanceActivity extends BaseActivity {

    private Team team;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_finance);
        TextView tvTitle = findViewById(R.id.tv_title);
        tvTitle.setText("社团财务");
        RecyclerView recyclerView = findViewById(R.id.rv_finance);
        List<Bill> bills = DataSupport.findAll(Bill.class);
        FinanceAdapter adapter = new FinanceAdapter(bills);
        recyclerView.setLayoutManager(new LinearLayoutManager(this));
        recyclerView.setAdapter(adapter);
    }
}
